// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;

namespace Admin.NET.Application;

/// <summary>
/// 库位表基础输入参数
/// </summary>
public class WarePlaceModelBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 库位编码
    /// </summary>
    [Required(ErrorMessage = "库位编码不能为空")]
    public virtual string WarePlaceCode { get; set; }
    
    /// <summary>
    /// 库位名称
    /// </summary>
    [Required(ErrorMessage = "库位名称不能为空")]
    public virtual string WarePlaceName { get; set; }
    
    /// <summary>
    /// 库位容量
    /// </summary>
    [Required(ErrorMessage = "库位容量不能为空")]
    public virtual int? WarePlaceVolume { get; set; }
    
    /// <summary>
    /// 库位主管
    /// </summary>
    public virtual long? UserId { get; set; }
    
    /// <summary>
    /// 仓库ID
    /// </summary>
    public virtual long? WarehouseId { get; set; }
    
    /// <summary>
    /// 库位状态
    /// </summary>
    [Required(ErrorMessage = "库位状态不能为空")]
    public virtual bool? WarePlaceType { get; set; }
    
    /// <summary>
    /// 商品名称
    /// </summary>
    public virtual string? ShopName { get; set; }
    
    /// <summary>
    /// 库位备注
    /// </summary>
    public virtual string? WarePlaceNote { get; set; }
    
}

/// <summary>
/// 库位表分页查询输入参数
/// </summary>
public class PageWarePlaceModelInput : BasePageInput
{
    /// <summary>
    /// 库位编码
    /// </summary>
    public string WarePlaceCode { get; set; }
    
    /// <summary>
    /// 库位名称
    /// </summary>
    public string WarePlaceName { get; set; }
    
    /// <summary>
    /// 库位容量
    /// </summary>
    public int? WarePlaceVolume { get; set; }
    
    /// <summary>
    /// 库位主管
    /// </summary>
    public long? UserId { get; set; }
    
    /// <summary>
    /// 库位状态
    /// </summary>
    public bool? WarePlaceType { get; set; }
    
    /// <summary>
    /// 商品名称
    /// </summary>
    public string? ShopName { get; set; }
    
    /// <summary>
    /// 库位备注
    /// </summary>
    public string? WarePlaceNote { get; set; }
    
    /// <summary>
    /// 仓库ID
    /// </summary>
    public long? WarehouseId { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 库位表增加输入参数
/// </summary>
public class AddWarePlaceModelInput
{
    /// <summary>
    /// 库位编码
    /// </summary>
    [Required(ErrorMessage = "库位编码不能为空")]
    [MaxLength(64, ErrorMessage = "库位编码字符长度不能超过64")]
    public string WarePlaceCode { get; set; }
    
    /// <summary>
    /// 库位名称
    /// </summary>
    [Required(ErrorMessage = "库位名称不能为空")]
    [MaxLength(128, ErrorMessage = "库位名称字符长度不能超过128")]
    public string WarePlaceName { get; set; }
    
    /// <summary>
    /// 库位容量
    /// </summary>
    [Required(ErrorMessage = "库位容量不能为空")]
    public int? WarePlaceVolume { get; set; }
    
    /// <summary>
    /// 库位主管
    /// </summary>
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库ID
    /// </summary>
    public long? WarehouseId { get; set; }
    
    /// <summary>
    /// 库位状态
    /// </summary>
    [Required(ErrorMessage = "库位状态不能为空")]
    public bool? WarePlaceType { get; set; }
    
    /// <summary>
    /// 商品名称
    /// </summary>
    [MaxLength(255, ErrorMessage = "商品名称字符长度不能超过255")]
    public string? ShopName { get; set; }
    
    /// <summary>
    /// 库位备注
    /// </summary>
    [MaxLength(512, ErrorMessage = "库位备注字符长度不能超过512")]
    public string? WarePlaceNote { get; set; }
    
}

/// <summary>
/// 库位表删除输入参数
/// </summary>
public class DeleteWarePlaceModelInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 库位表更新输入参数
/// </summary>
public class UpdateWarePlaceModelInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 库位编码
    /// </summary>    
    [Required(ErrorMessage = "库位编码不能为空")]
    [MaxLength(64, ErrorMessage = "库位编码字符长度不能超过64")]
    public string WarePlaceCode { get; set; }
    
    /// <summary>
    /// 库位名称
    /// </summary>    
    [Required(ErrorMessage = "库位名称不能为空")]
    [MaxLength(128, ErrorMessage = "库位名称字符长度不能超过128")]
    public string WarePlaceName { get; set; }
    
    /// <summary>
    /// 库位容量
    /// </summary>    
    [Required(ErrorMessage = "库位容量不能为空")]
    public int? WarePlaceVolume { get; set; }
    
    /// <summary>
    /// 库位主管
    /// </summary>    
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库ID
    /// </summary>    
    public long? WarehouseId { get; set; }
    
    /// <summary>
    /// 库位状态
    /// </summary>    
    [Required(ErrorMessage = "库位状态不能为空")]
    public bool? WarePlaceType { get; set; }
    
    /// <summary>
    /// 商品名称
    /// </summary>    
    [MaxLength(255, ErrorMessage = "商品名称字符长度不能超过255")]
    public string? ShopName { get; set; }
    
    /// <summary>
    /// 库位备注
    /// </summary>    
    [MaxLength(512, ErrorMessage = "库位备注字符长度不能超过512")]
    public string? WarePlaceNote { get; set; }
    
}

/// <summary>
/// 库位表主键查询输入参数
/// </summary>
public class QueryByIdWarePlaceModelInput : DeleteWarePlaceModelInput
{
}

/// <summary>
/// 库位表数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportWarePlaceModelInput : BaseImportInput
{
    /// <summary>
    /// 库位编码
    /// </summary>
    [ImporterHeader(Name = "*库位编码")]
    [ExporterHeader("*库位编码", Format = "", Width = 25, IsBold = true)]
    public string WarePlaceCode { get; set; }
    
    /// <summary>
    /// 库位名称
    /// </summary>
    [ImporterHeader(Name = "*库位名称")]
    [ExporterHeader("*库位名称", Format = "", Width = 25, IsBold = true)]
    public string WarePlaceName { get; set; }
    
    /// <summary>
    /// 库位容量
    /// </summary>
    [ImporterHeader(Name = "*库位容量")]
    [ExporterHeader("*库位容量", Format = "", Width = 25, IsBold = true)]
    public int? WarePlaceVolume { get; set; }
    
    /// <summary>
    /// 库位主管
    /// </summary>
    [ImporterHeader(Name = "库位主管")]
    [ExporterHeader("库位主管", Format = "", Width = 25, IsBold = true)]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 仓库ID
    /// </summary>
    [ImporterHeader(Name = "仓库ID")]
    [ExporterHeader("仓库ID", Format = "", Width = 25, IsBold = true)]
    public long? WarehouseId { get; set; }
    
    /// <summary>
    /// 库位状态
    /// </summary>
    [ImporterHeader(Name = "*库位状态")]
    [ExporterHeader("*库位状态", Format = "", Width = 25, IsBold = true)]
    public bool? WarePlaceType { get; set; }
    
    /// <summary>
    /// 商品名称
    /// </summary>
    [ImporterHeader(Name = "商品名称")]
    [ExporterHeader("商品名称", Format = "", Width = 30, IsBold = true)]
    public string? ShopName { get; set; }
    
    /// <summary>
    /// 库位备注
    /// </summary>
    [ImporterHeader(Name = "库位备注")]
    [ExporterHeader("库位备注", Format = "", Width = 30, IsBold = true)]
    public string? WarePlaceNote { get; set; }
    
}

/// <summary>
/// 添加库位商品输入参数
/// </summary>
public class AddWarePlaceGoodsInput
{
    /// <summary>
    /// 库位ID
    /// </summary>
    [Required(ErrorMessage = "库位ID不能为空")]
    public long WarePlaceId { get; set; }
    
    /// <summary>
    /// 商品ID
    /// </summary>
    [Required(ErrorMessage = "商品ID不能为空")]
    public long GoodsId { get; set; }
    
    /// <summary>
    /// 商品名称
    /// </summary>
    [Required(ErrorMessage = "商品名称不能为空")]
    public string GoodsName { get; set; }
    
    /// <summary>
    /// 商品数量
    /// </summary>
    [Required(ErrorMessage = "商品数量不能为空")]
    public decimal Quantity { get; set; }
    
    /// <summary>
    /// 商品金额
    /// </summary>
    [Required(ErrorMessage = "商品金额不能为空")]
    public decimal Amount { get; set; }
    
    /// <summary>
    /// 订单号
    /// </summary>
    public string? OrderCode { get; set; }
}

/// <summary>
/// 更新库位商品输入参数
/// </summary>
public class UpdateWarePlaceGoodsInput
{
    /// <summary>
    /// 库位ID
    /// </summary>
    [Required(ErrorMessage = "库位ID不能为空")]
    public long WarePlaceId { get; set; }
    
    /// <summary>
    /// 商品ID
    /// </summary>
    [Required(ErrorMessage = "商品ID不能为空")]
    public long GoodsId { get; set; }
    
    /// <summary>
    /// 商品数量
    /// </summary>
    public decimal? Quantity { get; set; }
    
    /// <summary>
    /// 商品金额
    /// </summary>
    public decimal? Amount { get; set; }
}

/// <summary>
/// 删除库位商品输入参数
/// </summary>
public class DeleteWarePlaceGoodsInput
{
    /// <summary>
    /// 库位ID
    /// </summary>
    [Required(ErrorMessage = "库位ID不能为空")]
    public long WarePlaceId { get; set; }
    
    /// <summary>
    /// 商品ID
    /// </summary>
    [Required(ErrorMessage = "商品ID不能为空")]
    public long GoodsId { get; set; }
}

/// <summary>
/// 批量更新库位商品输入参数
/// </summary>
public class BatchUpdateWarePlaceGoodsInput
{
    /// <summary>
    /// 库位ID
    /// </summary>
    [Required(ErrorMessage = "库位ID不能为空")]
    public long WarePlaceId { get; set; }
    
    /// <summary>
    /// 商品列表
    /// </summary>
    [Required(ErrorMessage = "商品列表不能为空")]
    public List<Admin.NET.Core.Model.WarePlaceGoods> GoodsList { get; set; }
}

